/**
 * Created by IntelliJ IDEA.
 * User: yibing.tan
 * Date: 11-11-14
 * Time: 下午4:39
 * To change this template use File | Settings | File Templates.
 */
public class Monitor {
    private long beginTime;
    private long time;

    private Monitor(long beginTime) {
        this.beginTime = beginTime;
    }

    public static Monitor newMonitor() {
        return new Monitor(System.currentTimeMillis());
    }

    public long getTime() {
        return System.currentTimeMillis() - beginTime;
    }
}
